/**
 * Created by dale on 2017/10/24.
 */
var iBPCId;
$(document).ready(function () {
    iBPCId = addressUri.getParam('iBPCId');
    $("[name=iBPCId]").val(iBPCId);
    $.ajax({
        url:baseUrl+'mobile/backlog/getNodeDetail',
        type:'POST',
        data:{iBPCId:iBPCId},
        dataType:'json',
        success:function (data) {
            if(data['tPlanDate']!=null){
                $('#tPlanDate').datebox('setValue', data['tPlanDate']);
            }
            $('#title').html(data['sNodeName']);
        },
        error:function (data) {
            console.log(data);
        }
    });

    $('#save').click(function () {
        $.ajax({
            url: baseUrl + 'bpm/plan/saveContent',
            type: 'POST',
            data: $('#ff').serialize(),
            success: function (data) {
                if(data=='success'){
                    window.parent.upCountLog();
                    $.messager.alert('成功',data,'info');
                }
                window.top.upCountLog();
            },
            error: function (data) {
                console.log(data);
            }
        });
    });
})


